<?php
/**
 *
 */
namespace Yz\modules\News;

class Model_Default
    extends \Yz\modules\Generic\Model_Default
{

    /**
     *
     *  @param int $id
     *  @return Yz_Item_Interface
     *  @throws NotFound
     */
    public function fetchItemByTitle($title)
    {
        debug();
        $item = $this->selectItem();

        $action = $this->selectAction('SelectByTitle');
        $action
            ->assignFields($item->describe())
            ->setTitle($title);

        $values = $action()->fetch();

        return $item->assignValues($values);
    }


}
